const mongoose = require('mongoose')
const Schema = mongoose.Schema
const userSchema = new Schema({
  username: {
    type: String,
    required: true,
    maxlength: 32,
    minlength: 3
  },
  password: {
    type: String,
    required: true,
    minlength: 3
  },
  salt: {
    type: Buffer,
    required: true
  },
},{timestamps: true})

mongoose.model('Users', userSchema, 'user')